test-xattrs: sync how this is skipped with test-rofiles-fuse
authorSimon McVittie <smcv@debian.org>
Thu, 31 Mar 2016 16:47:36 +0000 (17:47 +0100)
committerColin Walters (automation) <walters+githubbot@verbum.org>
Thu, 31 Mar 2016 18:54:13 +0000 (18:54 +0000)
If we touch test-xattrs before sourcing libtest.sh, we get:

test tmpdir=/tmp/test-tmp-ostree_test-xattrs.sh.test-HSEXEY is not
empty; run this test via `make check TESTS=`, not directly

Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #234
Approved by: cgwalters

tests/test-xattrs.sh

index 2f2d99ccac2cbe9aef4a6431435fad76c1b21eda..cdc06e8760f4ae64991a7c186ae7bbf35c8ea74e 100755 (executable)
 
 set -euo pipefail
 
-touch test-xattrs
-if ! setfattr -n user.testvalue -v somevalue test-xattrs; then
-    echo "1..0 # SKIP: cannot run setfattr"
-    exit 0
-fi
+. $(dirname $0)/libtest.sh
 
-echo "1..2"
+skip_without_user_xattrs
 
-. $(dirname $0)/libtest.sh
+echo "1..2"
 
 setup_test_repository "archive-z2"